# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=mdcrack
pkgver=1.2
pkgrel=7
groups=('blackarch' 'blackarch-cracker')
pkgdesc='MD4/MD5/NTLM1 hash cracker.'
url='http://c3rb3r.openwall.net/mdcrack/'
arch=('x86_64' 'aarch64')
license=('custom:unknown')
source=("http://c3rb3r.openwall.net/$pkgname/download/$pkgname-$pkgver.tar.gz"
        "$pkgname.patch")
sha512sums=('1a0ec91e19c65ea5c94b988a3a40226e2996adde26970e847ee3756263e65201751c449e6a29595b67314480be10460fdb2ebb31b5e734039d777e58b42c2965'
            '9c808c882f7558b3e08bac37de01a6e15eb453cb14b03d7e9022f001f498f4394c872b94cb78b02b20b12a34fd359d43604ebfb818cef51a67d3aa191fd363f0')

prepare() {
  cd "$pkgname-$pkgver"

  patch -Np1 < ../mdcrack.patch
}

build() {
  cd "$pkgname-$pkgver"

  make little
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm 755 "bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

